<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Path Problem</title>

<link rel="stylesheet" type="text/css"
	href="<%=basePath%>syntax_highlighter/jquery.snippet.css" />
<base href=<%=basePath%> />

</head>
<body>
	使用绝对路径
	<pre class="path">
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	</pre>
	<p>path = <%=path %><br>
	basePath = <%=basePath %><p>
	<a href="<%=basePath%>Hello.jsp">Hello</a>
	<p>
	<a href="Hello.jsp">Hello!</a>
	<p>

		<script type="text/javascript"
			src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
		<script type="text/javascript"
			src="<%=basePath%>syntax_highlighter/jquery.snippet.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$("pre.path").snippet("java", {
					style : "blacknblue"
				});
			});
			
		</script>
</body>
</html>